import request from '@/utils/request';
import { API } from './enumAPI';

// 设备列表
export const reqDeviceList = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_LISTS_URL, data);
export const reqDeviceAll = () => request.get<any, any>(API.DEVICE_ALL_URL);
export const reqDeviceDetail = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_DETAIL_URL, data);
export const reqDeviceProperty = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_PROPERTY_URL, data);
// 设备告警
export const reqDeviceAlarm = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_ALARM_URL, data);
// 设备分组修改
export const reqChangeDeviceRegion = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_BATCH_UPDATE_URL, data);
// 设备重启 DEVICE_REBOOT_URL
export const reqRebootDevice = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_REBOOT_URL, data);
// 设备升级
export const reqUpgradeDevice = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_UPGRADE_URL, data);
// 批量升级
export const reqBatchUpgradeDevice = (data: any = { data: {} }) => request.post<any, any>(API.DEVICE_UPGRADE_BATCH_URL, data);
